from dingxiang.utils import constants
from rest_framework.generics import ListAPIView
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
class CacheListApiView(ListAPIView):
    """
    列表视图缓存
    """
    @method_decorator(cache_page(constants.APIVIEW_PAGE_CACHE_TIME))
    def get(self,request,*args,**kwargs):
        return super().get(request, *args, **kwargs)
